package com.dc.project.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dc.common.validated.DeleteGroup;
import com.dc.common.validated.InsertGroup;
import com.dc.common.validated.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 角色菜单关联表(SysRoleMenu)实体类
 *
 * @author zhuangcy
 * @since 2021-06-04 17:09:09
 */
@TableName("sys_role_menu")
@Data
@ApiModel(value = "角色菜单关联表")
public class SysRoleMenu implements Serializable {
    private static final long serialVersionUID = 971792856786505895L;
    /**
     * 角色菜单id
     */
    @NotNull(message = "角色菜单id不能为空", groups = {UpdateGroup.class, DeleteGroup.class})
    @TableId(value = "role_menu_id", type = IdType.AUTO)
    @ApiModelProperty(name = "roleMenuId", value = "角色菜单id")
    private Long roleMenuId;
    /**
     * 角色id
     */
    @NotNull(message = "角色id不能为空", groups = {InsertGroup.class, UpdateGroup.class})
    @TableField(value = "role_id")
    @ApiModelProperty(name = "roleId", value = "角色id")
    private Integer roleId;
    /**
     * 菜单id
     */
    @NotNull(message = "菜单id不能为空", groups = {InsertGroup.class, UpdateGroup.class})
    @TableField(value = "menu_id")
    @ApiModelProperty(name = "menuId", value = "菜单id")
    private Integer menuId;


}